#include <sis3300.h>
Public Types | |
enum | _ClockSource { Internal100Mhz = 0, Internal50Mhz = 1, Internal25Mhz = 2, Internal12_5Mhz = 3, Internal6_25Mhz = 4, Internal3_125Mhz = 5, ExternalFp = 6, ExternalP2 = 7 } |
enum | _SampleSize { Sample128K = 0, Sample16K = 1, Sample4K = 2, Sample2K = 3, Sample1K = 4, Sample512 = 5, Sample256 = 6, Sample128 = 7 } |
Public Methods | |
CSIS3300 (unsigned long nBaseAddress) | |
~CSIS3300 () | |
volatile unsigned long * | getModuleBase () |
string | getModuleId () const |
volatile unsigned long * | getCsr () |
volatile unsigned long * | getAcquisitionRegister () |
volatile unsigned long * | getResetKeyRegister () |
volatile unsigned long * | getStartKeyRegister () |
volatile unsigned long * | getEventConfigRegister () |
volatile unsigned long * | getStartDelayRegister () |
volatile unsigned long * | getStopDelayRegister () |
volatile unsigned long * | getEventDirectory () |
volatile unsigned long * | getGroup1Pointer () |
volatile unsigned long * | getGroup2Pointer () |
volatile unsigned long * | getGroup3Pointer () |
volatile unsigned long * | getGroup4Pointer () |
void | SetClock (ClockSource eSource) |
void | SetStartDelay (bool Enable=false, unsigned int nClocks=0) |
void | SetStopDelay (bool Enable=false, unsigned int nClocks=0) |
void | GateMode (bool Enable=false) |
void | TriggerOnStop (bool Enable=true) |
void | SetSampleSize (SampleSize eSamples) |
void | EnableWrap (bool Enable=true) |
void | SetThresholds (bool *pLessThan, unsigned int *pValues) |
enum CSIS3300::ClockSource | getCurrentClockSource () |
bool | isStartDelayEnabled () |
unsigned int | getStartDelayClocks () |
bool | isStopDelayEnabled () |
unsigned int | getStopDelayClocks () |
unsigned int | getThresholdValue (unsigned int channel) const |
bool | isLtThreshold (unsigned int channel) const |
void | InitDaq () |
void | StartSampling () |
void | WaitUntilDone () |
unsigned int | ReadGroup1 (DAQWordBufferPtr &pBuffer) |
unsigned int | ReadGroup2 (DAQWordBufferPtr &pBuffer) |
unsigned int | ReadGroup3 (DAQWordBufferPtr &pBuffer) |
unsigned int | ReadGroup4 (DAQWordBufferPtr &pBuffer) |
unsigned int | ReadAllGroups (DAQWordBufferPtr &pBuffer) |
void | ClearDaq () |
Public Attributes | |
enum CSIS3300::_ClockSource | ClockSource |
the enum values match the bit field values. | |
enum CSIS3300::_SampleSize | SampleSize |
Protected Methods | |
unsigned int | ReadAGroup (DAQWordBufferPtr &pBuffer, volatile unsigned long *pAddressReg, volatile unsigned long *pBase) |
Initialize the module to work in external trigger: Start or stop mode, single event mode with specified Clock source and sample size, and pre/post trigger delays.
This class does not support ADC thresholds, or multievent mode but they can be added later.
|
Constructs an object which provides access to the SIS3300. The initial configuration of the module will be:
|
|
Destroys the current sis3300. We do the following: 1. munmap 2. Ask the driver to forget the map. |
|
Clears the Module. This case that means re-enabling the Bank 1 sampling bit in the DAQ register. |
|
Enable the page wrap. In page wrap mode, there is no implied stop when an event page is full. The event just wraps around to the start of the event in the event buffer. This is used in post trigger mode: In that mode, you manually start acquisition and let the samples come in until the delayed stop stops acquisition. At that time the module contains a set of points prior to and after the actual stop time.
|
|
Enables or disables gate mode. In gate mode, the module will start on the falling edge of Start and stop on the rising edge. Note that the pre-post trigger modes are pretty useless in gatemode.
|
|
Initializes the data module for data acquisition. Until this member is called, none of the modules registeres have been touched. This member examines the member data and programs the module accordingly. |
|
Utility function to read a Group. The data for a group is in a circular buffer. The address register indexes just past the end of the event. Our job is to compute the location of the star of the event and read the entire event. In general, the event comes in two chunks. A part from the start of the event to the end of the memory, and a part from the beginning of the event memory to the event pointer -1.
|
|
Reads all data groups. The groups are read in numerical order. Note that within each group, the adc's are interspersed as they are in the event memory.
|
|
Read the first group of adc's This comprises channel 0, 1
|
|
Read the second group of adc's This comprises channel 2,3
|
|
Read the third group of adc's This comprises channel 4,5
|
|
Read the fourth group of adc's This comprises channel 6,7
|
|
Sets the clock sourc. The clock source is determined by the enumerator: ClockSource It can be a range of internal frequencies or it can be an external clock on the front panel or p2 connector.
|
|
Sets the number of samples in an event. This is reflected by both m_ePagessize and m_nPagesize.
|
|
Sets the start delay: The start pulse is first delayed by a fixed number of clock pulses before being fed to the fadc logic: This allows the adc to be operated in a pre-trigger mode (trigger comes before actual signal).
|
|
Sets the stop delay. The stop pulse is first delayed by a fixed number of clock pulses before being fed into the fadc logic. This allows the adc to be operated in a post trigger mode (trigger comes after the actual signal). To operate in post trigger mode:
|
|
Sets the adc trigger thresholds. Each channel has a threshold register. If the digitized value exceeds the threshold in any channel, a trigger output is generated. This allows the ADC's to operate in free run self triggered mode. For each channel the caller must provide a flag, which if true, indicates the trigger fires for signals less than the threshold, or if false, indicates the trigger fires for signals greater than the threshold. For each channel, the caller must provide a threshold value. Note that for bipolar input adc's zero level is 0x800.
|
|
Starts sampling. This is used in stop trigger mode. In that case, sampling could be manually started and then stopped due to an external signal (e.g. posttrigger). |
|
Sets the trigger mode to trigger on stop.. If enabled, the module triggers when the stop pulse occurs. This is usually only used in a post trigger mode.
|
|
Waits until data taking for an event is done. This happens when the system becomes diarmed, as evidenced by the fact that the memory bank1 sample clock is no longer enabled. |
|
Returns the current clock source as the enumerated value. |
|
Returns the number of clocks in the start delay.
|
|
Returns the number of clocks in the stop delay.
|
|
Returns:
|
|
Returns
|